package cn.edu.ncepu.junit.learn;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 *
 * 2025-11-05
 *
 * @author 醒过来摸鱼
 */
@ExtendWith(MockitoExtension.class)
class HelloServiceTest {

    @InjectMocks
    private HelloService helloService;

    @Mock
    private HelloDao helloDao;

    @Test
    void hello() {
        Mockito.when(helloDao.query()).thenReturn(3);
        assertEquals(helloService.hello(),3);
    }


}